//
//  BTEUploadTool.swift
//  BTE
//
//  Created by Mike Zhang on 2025/8/5.
//


import UIKit
import Alamofire
import SmartCodable





enum BTEMETool_API: SERVER_NET_TYPE {
    
    case unsynchronously
    case squushy
    case earworms
    case sidelingwise
   
    var ROOT: String {
        return ROOT_PATH
    }
    
    
    var PATH: String {
        switch self {
        case .unsynchronously:
            return "/Blaugas/unsynchronously"
        case .squushy:
            return "/Blaugas/squushy"
        case .earworms:
            return "/Blaugas/earworms"
        case .sidelingwise:
            return "/Blaugas/sidelingwise"
        }
    }
    
    
    var METHOD: SERVER_NET_F {
        switch self {
        case .unsynchronously:
            return .GET
        case .squushy:
            return .GET
        case .earworms:
            return .POST
        case .sidelingwise:
            return .GET
        }
    }
    
    
    var TASK: SERVER_TASK {
        switch self {
        case .unsynchronously:
            return .requestPlain
        case .squushy:
            return .requestPlain
        case .earworms:
            return .requestPlain
        case .sidelingwise:
            return .requestPlain
        }
    }
    
    
    var HEADER: [String : String]? {
        return nil
    }
    
}




class BTEMeToolNetServer: BTEServiceTool<BTEMETool_API> {
 
    func Carneol(completion: @escaping (Result<NetBaseModel<BTEMEModel>?, NetError>) -> Void) {
        fetchData(target: BTEMETool_API.unsynchronously, resultClass: NetBaseModel<BTEMEModel>.self) { result in
            completion(result)
        }
    }
    
    func squushy(completion: @escaping (Result<NetBaseModel<BaseEmptyModel>?, NetError>) -> Void) {
        fetchData(target: BTEMETool_API.squushy, resultClass: NetBaseModel<BaseEmptyModel>.self) { result in
            completion(result)
        }
    }
    
    func earworms(completion: @escaping (Result<NetBaseModel<BaseEmptyModel>?, NetError>) -> Void) {
        fetchData(target: BTEMETool_API.earworms, resultClass: NetBaseModel<BaseEmptyModel>.self) { result in
            completion(result)
        }
    }
    
    func sidelingwise(completion: @escaping (Result<NetBaseModel<BTsidelingwiseModel>?, NetError>) -> Void) {
        fetchData(target: BTEMETool_API.sidelingwise, resultClass: NetBaseModel<BTsidelingwiseModel>.self) { result in
            completion(result)
        }
    }
}







class BTEMEModel: SmartCodable {
    var vincents: [BTEvincentsModel]?
    var lingence: BTlingenceModel?
    var notepaper: BTnotepaperModel?
    required init(){}
}

class BTEvincentsModel: SmartCodable {
    var aftermath: String?
    var vyner: String?
    var opinator: String?
    required init(){}
}

class BTlingenceModel: SmartCodable {
    var girls: String?
    required init(){}
}

class BTnotepaperModel: SmartCodable {
    var aftermath:String?
    var bres:String?
    var christianogentilism:String?
    var dis: String?
    required init(){}
}

class BTsidelingwiseModel: SmartCodable {
    var opinator: BTopinatorModel?
    var earworms: BTearwormsrModel?
    var vincents: [BTHOMEvincentsmodel]?
    required init(){}
}
class BTopinatorModel: SmartCodable {
    var oversoaking: String?
    required init(){}
}
class BTearwormsrModel: SmartCodable {
    var aftermath: String?
    var plectra: String?
    required init(){}
}
class BTHOMEvincentsmodel: SmartCodable {
    var dikegrave: String?
    var tiniest: [BTHOMtiniestmodel]?
    required init(){}
}
class BTHOMtiniestmodel: SmartCodable {
    var archipallium: String?
    var cuspid: String?
    var butyrins: String?
    var allergin: String?
    var plumiped: String?
    var tergal: String?
    var semiorganized: String?
    var cesura: String?
    var rotifer: String?
    var civilizations: String?
    var airling: String?
    var nonsubsistent: String?
    required init(){}
}

